<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Redis\V20180412\Models;
use TencentCloud\Common\AbstractModel;

/**
 * DescribeInstanceNodeInfo response structure.
 *
 * @method integer getProxyCount() Obtain The number of proxy nodes
 * @method void setProxyCount(integer $ProxyCount) Set The number of proxy nodes
 * @method array getProxy() Obtain Proxy node information.
 * @method void setProxy(array $Proxy) Set Proxy node information.
 * @method integer getRedisCount() Obtain The number of Redis nodes
 * @method void setRedisCount(integer $RedisCount) Set The number of Redis nodes
 * @method array getRedis() Obtain TencentDB for Redis® node information.
 * @method void setRedis(array $Redis) Set TencentDB for Redis® node information.
 * @method integer getTendisCount() Obtain This parameter has been disused.
 * @method void setTendisCount(integer $TendisCount) Set This parameter has been disused.
 * @method array getTendis() Obtain This parameter is no longer used. Please ignore it.
 * @method void setTendis(array $Tendis) Set This parameter is no longer used. Please ignore it.
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class DescribeInstanceNodeInfoResponse extends AbstractModel
{
    /**
     * @var integer The number of proxy nodes
     */
    public $ProxyCount;

    /**
     * @var array Proxy node information.
     */
    public $Proxy;

    /**
     * @var integer The number of Redis nodes
     */
    public $RedisCount;

    /**
     * @var array TencentDB for Redis® node information.
     */
    public $Redis;

    /**
     * @var integer This parameter has been disused.
     */
    public $TendisCount;

    /**
     * @var array This parameter is no longer used. Please ignore it.
     */
    public $Tendis;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param integer $ProxyCount The number of proxy nodes
     * @param array $Proxy Proxy node information.
     * @param integer $RedisCount The number of Redis nodes
     * @param array $Redis TencentDB for Redis® node information.
     * @param integer $TendisCount This parameter has been disused.
     * @param array $Tendis This parameter is no longer used. Please ignore it.
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("ProxyCount",$param) and $param["ProxyCount"] !== null) {
            $this->ProxyCount = $param["ProxyCount"];
        }

        if (array_key_exists("Proxy",$param) and $param["Proxy"] !== null) {
            $this->Proxy = [];
            foreach ($param["Proxy"] as $key => $value){
                $obj = new ProxyNodes();
                $obj->deserialize($value);
                array_push($this->Proxy, $obj);
            }
        }

        if (array_key_exists("RedisCount",$param) and $param["RedisCount"] !== null) {
            $this->RedisCount = $param["RedisCount"];
        }

        if (array_key_exists("Redis",$param) and $param["Redis"] !== null) {
            $this->Redis = [];
            foreach ($param["Redis"] as $key => $value){
                $obj = new RedisNodes();
                $obj->deserialize($value);
                array_push($this->Redis, $obj);
            }
        }

        if (array_key_exists("TendisCount",$param) and $param["TendisCount"] !== null) {
            $this->TendisCount = $param["TendisCount"];
        }

        if (array_key_exists("Tendis",$param) and $param["Tendis"] !== null) {
            $this->Tendis = [];
            foreach ($param["Tendis"] as $key => $value){
                $obj = new TendisNodes();
                $obj->deserialize($value);
                array_push($this->Tendis, $obj);
            }
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
